package com.xpsoft.oa.workflow.event;

import org.apache.commons.lang.StringUtils;
import org.jbpm.api.jpdl.DecisionHandler;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.model.OpenProcessInstance;

//判断
public class MaterialDivertHandler implements DecisionHandler {

	@Override
	public String decide(OpenExecution execution) {

		String result = "总部仓管员";
		OpenProcessInstance pi = execution.getProcessInstance();
        String managerType = (String)pi.getVariable("materialDivert.managerType");//普通员工 非普通员工
      	if(StringUtils.isNotBlank(managerType)){
      		result = managerType;
      	}
		return result;
	}

}
